package org.sdfc.model.attr.key

import com.documentum.fc.common.IDfId
import com.documentum.fc.common.IDfTime

import org.sdfc.model.attr._

/** Attribute implementation detached of any physical model.
 */
abstract class KeyAttribute[+T] (
  /** Name of the KeyAttribute. */
  final val name : String
)
extends Attribute[T] {
  
  final override def equals(that : Any) : Boolean =
    that match {
      case k : KeyAttribute[_] => k.name == name && k.attrType == attrType
      case _ => false
    }
  
  final override def hashCode : Int = name.hashCode + 41 * attrType.hashCode
  
}

